import {createRouter, createWebHistory} from 'vue-router'
import AppBakView from "@/views/AppBakView.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/app-bak',
            name: 'AppBakView',
            component: () => import('../views/AppBakView.vue'),
            children: [
                {
                    path: '',
                    name: 'home',
                    component: () => import('../views/HomeView.vue'),
                },
                {
                    path: 'about',
                    name: 'about',
                    component: () => import('../views/AboutView.vue'),
                },
                {
                    path: 'deep-seek',
                    name: 'deep-seek',
                    component: () => import('../views/application/deep-seek.vue'),
                }
            ]
        },
        {
            path: '/',
            name: 'DefaultLayoutView',
            component: () => import('../views/layout/DefaultLayoutView.vue'),
            children: [
                {
                    path: '',
                    name: 'DefaultView',
                    component: () => import('../views/code-builder/FormBuilderGenerator.vue'),
                },
                {
                    path: 'builder/form',
                    name: 'FormBuilderView',
                    component: () => import('../views/code-builder/FormBuilderView.vue'),
                },
                {
                    path: 'builder/db',
                    name: 'DBBuilderView',
                    component: () => import('../views/code-builder/DBBuilderView.vue'),
                },
                {
                    path: 'builder/service',
                    name: 'ServiceBuilderView',
                    component: () => import('../views/code-builder/ServiceBuilderView.vue'),
                },
                {
                    path: 'builder/template',
                    name: 'TemplateBuilderView',
                    component: () => import('../views/code-builder/TemplateBuilderView.vue'),
                }
            ]
        }
    ]
})

export default router
